import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';

class BulletPointText extends StatelessWidget {
  final String text;
  final double? fontSize;
  final FontWeight? fontWeight;
  final double? height;
  final Color? textColor;
  final double? bulletSize;
  final List<Color>? bulletGradientColors;
  final double? maxWidth;

  const BulletPointText({
    super.key,
    required this.text,
    this.fontSize,
    this.fontWeight,
    this.height,
    this.textColor,
    this.bulletSize,
    this.bulletGradientColors,
    this.maxWidth,
  });

  @override
  Widget build(BuildContext context) {
    return Row(
      crossAxisAlignment: CrossAxisAlignment.start,
      mainAxisAlignment: MainAxisAlignment.start,
      children: [
        // Bullet point with padding to align with text top
        Padding(
          padding: EdgeInsets.only(
            top: 5.h,
          ), // Adjust this value to align with text
          child: Container(
            width: bulletSize ?? 8.w,
            height: bulletSize ?? 8.w,
            decoration: ShapeDecoration(
              gradient: LinearGradient(
                begin: const Alignment(0.50, 0.00),
                end: const Alignment(0.50, 0.86),
                colors:
                    bulletGradientColors ??
                    [const Color(0xFF0076FF), const Color(0xFF045EC6)],
              ),
              shape: const OvalBorder(),
            ),
          ),
        ),
        SizedBox(width: 10.w),
        // Text with constraints
        Container(
          constraints: BoxConstraints(maxWidth: maxWidth ?? 322.w),
          child: Text(
            text,
            style: TextStyle(
              color: textColor ?? Colors.white,
              fontSize: fontSize ?? 14.sp,
              fontFamily: GoogleFonts.inter().fontFamily,
              fontWeight: fontWeight ?? FontWeight.w600,
              height: height ?? 1.5,
            ),
          ),
        ),
      ],
    );
  }
}
